package com.ponhu.ea2.stockcenter.enums;

/**
 * Response返回值错误码列表
 */
public enum ResponseCodeEnum {

    SUCCESS(200, "success"),

    GET_TOKEN_EXCEPTION_900001(900001, "获取token异常"),
    GET_TOKEN_EXCEPTION_900002(900002, "token失效"),
    PARAMS_INCORRECT_EXCEPTION_900003(900003, "参数不正确"),
    IDEMPOTENCE_USED_ERROR_900004(900004, "使用幂等性注解必须有一个String类型的参数并且在参数的第一个位置"),
    IDEMPOTENCE_TOKEN_ERROR_900005(900005, "stockRequestToken不正确"),

    DOC_NO_IS_EXISTS_EXCEPTION_900200(900200, "销售层库存异常：单据号已经存在，不可重复使用"),
    ADD_OCCUPY_STOCK_EXCEPTION_900201(900201, "销售层库存异常：增加占用库存失败，库存不足"),
    SURPLUS_SALES_STOCK_EXCEPTION_900202(900202, "销售层库存异常：减少可售库存失败，库存不足"),
    RELEASE_OCCUPY_STOCK_EXCEPTION_900203(900203, "销售层库存异常：释放占用库存失败，库存不足"),

    SETTINGS_NOT_FOUND_900210(900210, "销售层库存异常：未找到事件所对应的settings配置"),
    INVENTORY_EMPTY_EXCEPTION_900211(900211, "销售层库存异常：未找到货品实物类库存"),
    DOC_NOT_FOUND_EXCEPTION_900212(900212, "销售层库存异常：订单不存在"),
    DOC_CANCELED_EXCEPTION_900213(900213, "销售层库存异常：订单已取消"),
    DOC_OUTED_EXCEPTION_900214(900214, "销售层库存异常：订单已出库"),
    DOC_STATUS_UPDATE_EXCEPTION_900215(900215, "销售层库存异常：订单状态更新失败"),

    STOCK_WAREHOUSE_EXCEPTION_900100(900100, "仓库库存异常：仓库可用库存校验不足"),
    STOCK_WAREHOUSE_EXCEPTION_900101(900101, "仓库库存异常：仓库库存变动数据库操作异常"),
    STOCK_WAREHOUSE_EXCEPTION_900103(900103, "仓库库存异常：批量保存仓库库存变动记录异常"),
    STOCK_WAREHOUSE_EXCEPTION_900104(900104, "仓库库存异常：批量保存仓库库存变动快照异常"),
    STOCK_WAREHOUSE_EXCEPTION_900105(900105, "仓库库存异常：调拨申请或请求出库的货品不在当前仓库"),
    STOCK_WAREHOUSE_EXCEPTION_900106(900106, "仓库库存异常：调拨货品在商品系统不存在"),
    STOCK_WAREHOUSE_EXCEPTION_900107(900107, "仓库库存异常：调拨出库/入库/取消前必须存在调拨申请"),
    STOCK_WAREHOUSE_EXCEPTION_900108(900108, "仓库库存异常：记录任务链执行时货品在仓库间变动异常"),
    STOCK_WAREHOUSE_EXCEPTION_900109(900109, "仓库库存异常：当前调拨申请已取消"),
    STOCK_WAREHOUSE_EXCEPTION_900110(900110, "仓库库存异常：相同调拨单号重复调拨申请"),
    STOCK_WAREHOUSE_EXCEPTION_900111(900111, "仓库库存异常：分批调拨出库或入库的总数量不可大于调拨申请的数量"),
    STOCK_WAREHOUSE_EXCEPTION_900112(900112, "仓库库存异常：调拨申请已执行调拨出库或入库则不能取消"),
    STOCK_WAREHOUSE_EXCEPTION_900113(900113, "仓库库存异常：销售出库不存在销售单据库存占用异常"),
    STOCK_WAREHOUSE_EXCEPTION_900114(900114, "仓库库存异常：任务链路中的不同类型动作操作库存数要保持一致"),
    STOCK_WAREHOUSE_EXCEPTION_900115(900115, "仓库库存异常：订单履约或采退履约过程中不可从不可售仓到可售仓"),
    STOCK_WAREHOUSE_EXCEPTION_900116(900116, "仓库库存异常：批量保存批次库存变动记录异常"),
    STOCK_WAREHOUSE_EXCEPTION_900117(900117, "仓库库存异常：批量保存批次库存异常"),
    STOCK_WAREHOUSE_EXCEPTION_900118(900118, "仓库库存异常：批次库存出现负数"),

    STOCK_SALES_EXCEPTION_900301(900301, "销售库存异常：释放销售库存占用异常"),
    STOCK_SALES_EXCEPTION_900303(900303, "销售库存异常：已取消或已发货的订单或采退单不可再执行销售出库或采退出库"),
    STOCK_SALES_EXCEPTION_900304(900304, "销售库存异常：销售库存变动操作异常"),
    STOCK_SALES_EXCEPTION_900305(900305, "销售库存异常：调拨出库修改销售占用状态异常"),
    STOCK_SALES_EXCEPTION_900306(900306, "统计库存异常：修改货品调拨在途库存数量异常"),

    STOCK_CHECK_EXCEPTION_900401(900401, "库存修复异常：删除库存中心实物侧库存数据异常"),
    STOCK_CHECK_EXCEPTION_900402(900402, "库存修复异常：保存库存中心实物侧库存数据异常"),
    STOCK_CHECK_EXCEPTION_900403(900403, "库存修复异常：修改库存中心销售侧库存数据异常"),

    JOIN_OMS_GET_ORDER_STATUS_LIST_EXCEPTION_900701(900701, "对接OMS：获取订单状态列表数据异常"),

    JOIN_GOODS_CENTER_INVENTORY_IS_EMPTY_900801(900801, "对接商品中心：货品编码列表不能为空"),
    JOIN_GOODS_CENTER_INVENTORY_IS_NOT_EXISTS_900802(900802, "对接商品中心：货品编码不存在"),
    JOIN_GOODS_CENTER_INVENTORY_IS_NOT_VIRTUAL_900803(900803, "对接商品中心：货品不是虚拟类"),

    JOIN_WMS_INIT_STOCK_DATA_EXCEPTION(900901, "对接WMS：初始化库存数据异常"),


    EXCEPTION_FAIL(-1, "error");

    private Integer code;
    private String msg;

    ResponseCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}

